Skip to content

RFC#560 - {{eq}}, {{neq}} as keywords#21339

Open
NullVoxPopuli wants to merge 5 commits intomainfrom
nvp/eq-neq-as-keyword
Open

RFC#560 - {{eq}}, {{neq}} as keywords#21339
NullVoxPopuli wants to merge 5 commits intomainfrom
nvp/eq-neq-as-keyword

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

NullVoxPopuli and others added 2 commits April 24, 2026 10:35
Add equality helpers and register them as built-in keywords so they
no longer need to be imported in strict-mode (gjs/gts) templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

📊 Package size report   0.1%↑

File Before (Size / Brotli) After (Size / Brotli)
dist/dev/packages/@ember/helper/index.js 17.7 kB / 4.7 kB 6%↑18.7 kB / 5%↑4.9 kB
dist/dev/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.1 kB / 521 B 32%↑2.7 kB / 2%↑533 B
dist/dev/packages/shared-chunks/invoke-CgfoEtMT.js 2.6 kB / 881 B
dist/dev/packages/shared-chunks/neq-DujMPv1k.js 3.2 kB / 1 kB
dist/prod/packages/@ember/helper/index.js 17.6 kB / 4.7 kB 6%↑18.6 kB / 4%↑4.9 kB
dist/prod/packages/@ember/template-compiler/lib/plugins/auto-import-builtins.js 2.1 kB / 521 B 32%↑2.7 kB / 2%↑533 B
dist/prod/packages/shared-chunks/index-Cc8WmrB-.js 59.5 kB / 12 kB 189%↑172 kB / 220%↑38.5 kB
dist/prod/packages/shared-chunks/invoke-BdJCXD-b.js 1.8 kB / 634 B
dist/prod/packages/shared-chunks/neq-BqdovTuC.js 2 kB / 705 B
types/stable/@ember/helper/index.d.ts 18.6 kB / 4.5 kB 7%↑19.9 kB / 5%↑4.7 kB
types/stable/@glimmer/runtime/index.d.ts 2.6 kB / 753 B 4%↑2.8 kB / 1%↑763 B
types/stable/@glimmer/runtime/lib/helpers/eq.d.ts 207 B / 134 B
types/stable/@glimmer/runtime/lib/helpers/neq.d.ts 211 B / 138 B
types/stable/index.d.ts 42.8 kB / 4 kB 0.3%↑43 kB / -0.17%↓4 kB
Total (Includes all files) 5.4 MB / 1.3 MB 0.1%↑5.4 MB / 0.09%↑1.3 MB
Tarball size 1.2 MB 0.1%↑1.2 MB

🤖 This report was automatically generated by pkg-size-action

@NullVoxPopuli NullVoxPopuli changed the title RFC#560 - {{eq}}, {{neq}} as keywords#21312 RFC#560 - {{eq}}, {{neq}} as keywords Apr 24, 2026
@@ -0,0 +1,9 @@
import { DEBUG } from '@glimmer/env';

export const eq = (...args: unknown[]) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not be better TS wise for both helpers to do (a: unknown, b: unknown), so:

{{eq 1 2 3}}

Gets flagged by Glint?:

Expected 2 arguments, but got 3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better, perhaps, yes. I've updated it -- but the types for glint are going to require some iteration, because currently glint has no idea how to wire in these keywords.

I want to move all the types from glint in to ember-source, so the responsibility isn't backwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants